/**
 * Created by Administrator on 2017/5/25.
 */
"use strict";
const config = require('./config');
const mongoose = require('mongoose');
//var db= mongoose.createConnection(`mongodb://${config.username}:${config.pwd}@${config.host}:${config.port}/${config.database}`);
var db= mongoose.createConnection(`mongodb://${config.host}:${config.port}/${config.database}`);

db.on('open',function(){
    console.log('连接JD数据库成功');
});
module.exports=db;